home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Developers / src / out-of-phase-102-c / OutOfPhase 1.02 Source / OutOfPhase Folder / ModulationOscControl.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-23  |  3.1 KB  |  91 lines  |  [TEXT/KAHL]

  1. /* ModulationOscControl.h */
  2.  
  3. #ifndef Included_ModulationOscControl_h
  4. #define Included_ModulationOscControl_h
  5.  
  6. /* ModulationOscControl module depends on */
  7. /* MiscInfo.h */
  8. /* Audit */
  9. /* Debug */
  10. /* Definitions */
  11. /* FixedPoint */
  12. /* WaveTableOscControl */
  13. /* ModulationSpecifier */
  14. /* SampleOscControl */
  15. /* FastModulation */
  16. /* OscillatorSpecifier */
  17. /* Array */
  18. /* Memory */
  19. /* LFOListSpecifier */
  20. /* LFOGenerator */
  21. /* EnvelopeState */
  22. /* Envelope */
  23. /* ErrorDaemon */
  24.  
  25. #include "FixedPoint.h"
  26.  
  27. struct ModOscTemplateRec;
  28. typedef struct ModOscTemplateRec ModOscTemplateRec;
  29.  
  30. struct ModOscStateRec;
  31. typedef struct ModOscStateRec ModOscStateRec;
  32.  
  33. /* forwards */
  34. struct ArrayRec;
  35. struct ErrorDaemonRec;
  36.  
  37. /* get rid of all cached memory for state or template records */
  38. void                                    FlushModOscControl(void);
  39.  
  40. /* perform one envelope update cycle */
  41. void                                    UpdateModOscEnvelopes(ModOscStateRec* State);
  42.  
  43. /* dispose of the modulation oscillator state record */
  44. void                                    DisposeModOscState(ModOscStateRec* State);
  45.  
  46. /* dispose of the modulation oscillator information template */
  47. void                                    DisposeModOscTemplate(ModOscTemplateRec* Template);
  48.  
  49. /* create a new modulation oscillator template */
  50. ModOscTemplateRec*        NewModOscTemplate(struct ArrayRec* OscillatorList,
  51.                                                 float EnvelopeTicksPerSecond, long SamplingRate,
  52.                                                 MyBoolean Stereo, MyBoolean TimeInterp, MyBoolean WaveInterp,
  53.                                                 struct ErrorDaemonRec* ErrorDaemon);
  54.  
  55. /* create a new modulation oscillator state object. */
  56. ModOscStateRec*                NewModOscState(ModOscTemplateRec* Template,
  57.                                                 float FreqForMultisampling, float Accent1, float Accent2,
  58.                                                 float Accent3, float Accent4, float Loudness, float HurryUp,
  59.                                                 long* PreOriginTimeOut, float StereoPosition,
  60.                                                 float InitialFrequency);
  61.  
  62. /* fix up pre-origin time for the modulation oscillator state object */
  63. void                                    FixUpModOscStatePreOrigin(ModOscStateRec* State,
  64.                                                 long ActualPreOrigin);
  65.  
  66. /* set a new frequency for a modulation oscillator state object.  used for */
  67. /* portamento and modulation of frequency (vibrato) */
  68. void                                    ModOscStateNewFrequency(ModOscStateRec* State,
  69.                                                 float NewFrequencyHertz);
  70.  
  71. /* send a key-up signal to one of the oscillators */
  72. void                                    ModOscKeyUpSustain1(ModOscStateRec* State);
  73. void                                    ModOscKeyUpSustain2(ModOscStateRec* State);
  74. void                                    ModOscKeyUpSustain3(ModOscStateRec* State);
  75.  
  76. /* restart a modulation oscillator oscillator.  this is used for tie continuations */
  77. void                                    RestartModOscState(ModOscStateRec* State,
  78.                                                 float NewFreqMultisampling, float NewAccent1, float NewAccent2,
  79.                                                 float NewAccent3, float NewAccent4, float NewLoudness,
  80.                                                 float NewHurryUp, MyBoolean RetriggerEnvelopes,
  81.                                                 float NewStereoPosition, float NewInitialFrequency);
  82.  
  83. /* generate a sequence of samples (called for each envelope clock) */
  84. void                                    ModOscGenSamples(ModOscStateRec* State,
  85.                                                 long SampleCount, largefixedsigned* RawBuffer);
  86.  
  87. /* find out if the modulation oscillator has finished */
  88. MyBoolean                            ModOscIsItFinished(ModOscStateRec* State);
  89.  
  90. #endif
  91.